#ifndef EDGE_MAP_HPP
#define EDGE_MAP_HPP
#include<map>
#include<set>
#include<utility>
#include<iostream>

/**
 * @file   edge_map.hpp
 * @author Kimmo Luoma <kimmo@PHOTON3>
 * @date   Thu Sep 27 16:03:53 2012
 * 
 * @brief  Class that maps edges of a graph. 
 * Let \f$ G=\{V,E\} \f$ be a \f$ d \f$ -regular graph with self-loops. 
 * Then, let 
 * \f$ v \in V \f$ and \f$ e \in E \f$. We can 
 * label each edge \f$ e\f$  with two indices: \f$ v,k \f$ where  
 * \f$ k\in \{0,1,2,..,d-1\}\f$. \f$ e \to e(v,k)\f$. 
 *  
 */

/** 
 * std::pair of intergers
 * 
 */
typedef std::pair<int,int> intpair;

class edge_map{

private:	
  /**
   * emap contains the mapping \f$ e_v^j->(v,w) \f$ 
   * 
   */
  std::map<intpair,intpair> emap; 
public:
  /** 
   * default constructor
   * 
   */
  edge_map(){};
  /** 
   * constructor
   * 
   * @param vertices std::vector<int> 
   * @param edges std::vector<intpair>
   * @param d int 
   */
  edge_map(std::set<int> vertices, std::multimap<int,int> edges,int d);
  /** 
   * Copy constructor
   * 
   * @param em edge_map
   */
  edge_map(const edge_map& em);
  /** 
   * Copy assingment
   * 
   * @param em edge_map
   * 
   * @return reference to edge_map
   */
  edge_map& operator=(const edge_map& em);
  /** 
   * Destructor
   * 
   */
  ~edge_map();
};
#endif
